var WebRTC = function(){
	'use strict';
	var WebRTC = {};
	return WebRTC;
} ();

WebRTC.Client = function(){
	var common_channel = "/topic/common/message",
		private_channel = "/user/topic/private/message",
		room_channel = "/app/topic/room",
		transfer_channel = "/app/topic/transfer-msg",
		end_point = "./marcopolo",
		pcConfig = {
			'iceServers':[{
				'url':'stun:stun.l.google.com:19302'
			}]
		}
	
	var client = {};
	var pc = [],    //RTCPeerConnection
		localStream = null,
		remoteStream = [],
		subscription = null,
		stomp = Stomp.over(new SockJS(end_point));
	
	stomp.connect({},function(frame){
		console.debug("连接成功");
		//订阅公共信息源
		stomp.subscribe(common_channel,handleCommonMessage);
	},function(err){
		console.debug("连接出错",err);
	});
}